/**
 * 判断平台系统
 */

export const browserSystem = (function () {
  let isIOS: boolean
  let isAndroid: boolean
  let u = navigator.userAgent;
  let browser = {
    ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
    iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1,
    iPad: u.indexOf('iPad') > -1,
    android: u.indexOf('Android') > -1
  }

  if (browser.ios || browser.iPhone || browser.iPad) {
    isIOS = true
  } else if (browser.android) {
    isAndroid = true
  } else {

  }
  return {
    isIOS,
    isAndroid
  }
})()

